package lesson02;

import java.awt.*;

public class TestPaint {
    public static void main(String[] args) {
     new MyPaint().loadFrame();
    }
}
class MyPaint extends Frame {
    public  void loadFrame(){
        setBounds(200,200,300,300);
        setVisible(true);
    }
    //画笔
    @Override
    public void paint(Graphics g) {
//       g.setColor(Color.green);
       g.drawOval(100,100,100,100);
       g.fillOval(200,200,100,100);
       //养成习惯，画笔用完。将其还原成原始的颜色
    }
}

